home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4397 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  841 b 

  1. Path: rowdy.lonestar.org!nemesis!hammy!not-for-mail
  2. From: gordon@hammy.lonestar.org (Gordon Burditt)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: why doesn't atof work properly ?
  5. Date: 3 Feb 1996 17:04:31 -0600
  6. Organization: What organization?
  7. Message-ID: <4f0plv$95p@hammy.lonestar.org>
  8. References: <4f0ivh$3g7e@yuma.ACNS.ColoState.EDU>
  9. NNTP-Posting-Host: localhost.hammy.lonestar.org
  10.  
  11. >I was reading from da.dat, making everything into a char string. 
  12. >Then I used strtok to interpret the string, converting them into int or 
  13. >double variables through atoi or atof. But atof doesn't seem to work
  14. >at all. Enclosed is the file, da.dat and output.
  15.  
  16. If you want to use atof(), you need to include the header file
  17. for it, <stdlib.h>, or declare it properly yourself.  Your
  18. program did neither.
  19.  
  20.                     Gordon L. Burditt
  21.                     sneaky.lonestar.org!gordon
  22.  
  23.